feat(document): add --title-from-filename flag#56
Open
geopanther wants to merge 1 commit into
Open
Conversation
Add option to always use the filename as the page title, overriding any title found in the document header or front matter. Useful when multiple files share the same top-level heading but need distinct Confluence page titles. Mutually exclusive with --title. Errors when used with stdin input. Adapted from iamjackg/md2cf#115 by @devzeb.
Owner
Author
Maintainer ReviewVerdict: ✅ Approve with minor suggestion Clean, well-scoped feature that addresses a real pain point — when documents share headings like "Overview" or "Introduction" but need unique Confluence titles. Good:
Suggestion:
Note on upstream PR: The original md2cf PR also included an argument parser test file ( No blocking concerns. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
--title-from-filenameflag to always use the filename as the page title, overriding any title found in document headers or front matter. Useful when multiple markdown files share the same top-level heading but need distinct Confluence page titles.Adapted from iamjackg/md2cf#115 by @devzeb.
Changes
--title-from-filename(mutually exclusive with--title)page_title_from_filenamethroughget_pages_from_directory()andget_page_data_from_file_path()Tests
test_document_title.pycovering all combinations